-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add task_acks_late
configuration to Celery Executor
#37066
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can through the following page for writing and running the tests.
https://github.com/apache/airflow/blob/main/contributing-docs/09_testing.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test?
I just checked the conversation in the original issue, and personally I prefer to keep the default value to True and waits for community feedback before deciding if we need to change it to False. Let's wait for others reviews. |
Sure, False as default was a glitch. It makes a lot of sense to keep the current default. I am happy to add tests. What are optional and what are required tests? E.g. I have no experience with Kubernetes and Helm charts. So owuld for example be a unit test that checks if the variable is set properly be enough? With the Kubernetes stuff I may need assistance to get that merge-ready soonish... |
You can add a small test to check if the conf is taken into account by Airflow, you can use this test as a reference: airflow/tests/providers/celery/executors/test_celery_executor.py Lines 352 to 360 in e2393ee
|
Tried to add a basic unittest in b9be045. Checked it with breeze and it seems to work... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BTW.: When running tests with breeze (on WSL2) I get the following error message:
This does not prevent unittests from being executed though... |
Yes. Yu need to rebase and rerun it to fix it. Breeze /tests works for sure in latest main. Alternatively (but this is something breeze will always print as warning in this case) there are times before merging conflicting changes to main and refreshing constraints where you need to run build with Actually I think I wil make a small change to handle this case better because we already have feature to retry build with |
Co-authored-by: Hussein Awala <[email protected]>
Co-authored-by: Hussein Awala <[email protected]>
Co-authored-by: Niko Oliveira <[email protected]>
Co-authored-by: Niko Oliveira <[email protected]>
50420ee
to
1d9aa5e
Compare
I rebased this one and added PR to make future local build work in case we have not managed to refresh the constraints yet #37116 - that will take longer but will finally succeed and should close the loophole here. |
Thanks, @potiuk , I can confirm that breeze now builds and runs fine after rebase... |
Anything I can do to move this forward? |
Hmm, it seems the spell checking does ot like the new key name: ( |
Hope adding the exception for |
Co-authored-by: Jarek Potiuk <[email protected]>
task_acks_late
configuration to Celery Executor
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Congrats on your first commit 🎉 |
Celery task_acks_late is currently hard-coded to be deactivated. However, this causes issues when tasks exceed the
visibility_timeout
.This PR, adds a
task_acks_late
parameter to the Celery configuration. Default values remain unchanged, but with the new config options users can at least try, if this setting solves there issue if they encounter the'Task Instance Not Running' FAILED: Task is in the running state
error message.It is an enhanced re-implementation of #31829 and adresses #16163.
closes #16163
related: #31829
This is not covered by tests (yet). I can add tests but would be happy to receive pointers to e.g. existing test for environment settings, that I could adjust.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.